home *** CD-ROM | disk | FTP | other *** search
/ Packard Bell - Multimedia…D & Packard Bell Library / Packard Bell Master CD.iso / bu / k / 555597 / pbtools / backup / pbfix.bat < prev    next >
DOS Batch File  |  1995-02-07  |  11KB  |  334 lines

  1. @echo off
  2. if (%MPARM%)==() goto VERSION
  3. if %MPARM%==ALL goto SKIPVERSION
  4.  
  5. :Version
  6. @echo    Packard Bell PBFix -- Configuration Restore Utility -- Version 2.7.95a
  7. @echo ═════════════════════════════════════════════════════════════════════════════
  8.  
  9. :SKIPVERSION
  10. ctty nul
  11. set copycmd=/y
  12. SET TEMPATH=%PATH%
  13. PATH=%1
  14. SET ONE=%PATH%
  15. PATH=%TEMPATH%
  16. SET TEMPATH=
  17. SET PARM= NULL
  18.  
  19. if (%ONE%)==() goto HELP
  20. if %ONE% == HELP goto HELP
  21. if %ONE% == WINDOWS goto R_WIN
  22. if %ONE% == ROOT goto R_ROOT
  23. if %ONE% == PRODIGY goto R_PROD
  24. if %ONE% == DISKIMAG goto R_DISKIMAG
  25. if %ONE% == ALL goto R_ALL
  26. if %ONE% == PBNAV goto R_PBNAV
  27. goto HELP
  28.  
  29.  
  30. :R_WIN       REM**************************************************
  31.  
  32.   REM ** check for existence of files in backup sub-directory **
  33.  
  34.   if not exist c:\pbtools\backup\*.ini set PARM= R_WIN
  35.   if not exist c:\pbtools\backup\*.grp set PARM= R_WIN
  36.   if not exist c:\windows\*.ini set PARM= R_WINA
  37.   if %PARM%== R_WIN goto NOT_HERE
  38.   if %PARM%== R_WINA goto NOT_HERE
  39.  
  40.   REM ** copy files to correct directory **
  41.  
  42.   ctty con
  43.   @echo Please wait while the original Windows is being restored!
  44.   ctty nul
  45.   if exist c:\windows\*.ini copy c:\windows\*.ini c:\windows\*.fxi
  46.   if exist c:\pbtools\backup\*.ini copy c:\pbtools\backup\*.ini c:\windows
  47.   if exist c:\windows\*.grp copy c:\windows\*.grp c:\windows\*.fxg
  48.   if exist c:\pbtools\backup\*.grp copy c:\pbtools\backup\*.grp c:\windows
  49.   if exist c:\pbtools\backup\*.drv copy c:\pbtools\backup\*.drv c:\windows\system
  50.   if exist c:\pbtools\backup\*.hlp copy c:\pbtools\backup\*.hlp c:\windows\system
  51.  
  52.   if %MPARM%== ALL goto WINCONTINUE
  53.  
  54.   ctty con
  55.   @echo Process complete!
  56.   @echo.
  57.   @echo ╒════════════════════════════════════════════════════════════════════╕
  58.   @echo │ The existing *.ini files in the C:\WINDOWS sub-directory have been │
  59.   @echo │ renamed with an *.fxi extension and the existing *.grp files have  │
  60.   @echo │ been renamed with an *.fxg extension.                              │
  61.   @echo ╘════════════════════════════════════════════════════════════════════╛
  62.   ctty nul
  63.  
  64.   :WINCONTINUE
  65.  
  66. goto END
  67.  
  68.  
  69. :R_ROOT      REM**************************************************
  70.  
  71.   REM ** check for existence of files in backup sub-directory **
  72.  
  73.   if not exist c:\pbtools\backup\autoexec.bat set PARM= R_ROOT
  74.   if not exist c:\pbtools\backup\config.sys set PARM= R_ROOT
  75.   if %PARM%== R_ROOT goto NOT_HERE
  76.  
  77.   REM ** copy files to correct directory **
  78.  
  79.   ctty con
  80.   @echo Please wait while the original Root is being restored!
  81.   ctty nul
  82.   if exist c:\autoexec.bat copy c:\autoexec.bat c:\autoexec.fx_
  83.   if exist c:\pbtools\backup\autoexec.bat copy c:\pbtools\backup\autoexec.bat c:\
  84.   if exist c:\config.sys copy c:\config.sys c:\config.fx_
  85.   if exist c:\pbtools\backup\config.sys copy c:\pbtools\backup\config.sys c:\
  86.   if not exist c:\jp.bat if exist c:\pbtools\backup\jp.bat copy c:\pbtools\backup\jp.bat c:\ /v
  87.  
  88.   IF %MPARM%== ALL goto RCONTINUE
  89.   
  90.   ctty con
  91.   @echo Process complete!
  92.   @echo. ╒═════════════════════════════════════════════════════════════════╕
  93.   @echo  │ The existing AUTOEXEC.BAT file has been renamed to AUTOEXEC.FX_ │
  94.   @echo  │ and the CONFIG.SYS file has been renamed to CONFIG.FX_.         │
  95.   @echo  ╘═════════════════════════════════════════════════════════════════╛
  96.   ctty nul
  97.  
  98.   :RCONTINUE
  99.  
  100. goto END
  101.  
  102. :R_PBNAV      REM**************************************************
  103.  
  104.   REM ** check for existence of files in backup sub-directory **
  105.  
  106.   if not exist c:\pbtools\backup\navigate.ini set PARM= R_PBNAV
  107.   if %PARM%== R_PBNAV goto NOT_HERE
  108.  
  109.   REM ** copy files to correct directory **
  110.  
  111.   ctty con
  112.   @echo Please wait while the original Navigator INI files
  113.   @echo are being restored!
  114.   ctty nul
  115.   if exist c:\pbnav30\pbnew\navigate.ini copy c:\pbnav30\pbnew\navigate.ini c:\pbnav30\pbnew\navigate.fx_
  116.   if exist c:\pbtools\backup\navigate.ini copy c:\pbtools\backup\navigate.ini c:\pbnav30\pbnew
  117.   if exist c:\pbnav30\kidspace\kidspace.ini copy c:\pbnav30\kidspace\kidspace.ini c:\pbnav30\kidspace\kidspace.fx_
  118.   if exist c:\pbtools\backup\kidspace.ini copy c:\pbtools\backup\kidspace.ini c:\pbnav30\kidspace
  119.   if exist c:\pbnav30\kidspace\*.inf del c:\pbnav30\kidspace\*.inf
  120.   if exist c:\pbnav30\docmgr\docmgr.ini copy c:\pbnav30\docmgr\docmgr.ini c:\pbnav30\docmgr\docmgr.fx_
  121.   if exist c:\pbtools\backup\docmgr.ini copy c:\pbtools\backup\docmgr.ini c:\pbnav30\docmgr
  122.   if exist c:\pbnav30\docmgr\*.inf del c:\pbnav30\docmgr\*.inf
  123.   if exist c:\pbtools\backup\acessory.ico copy c:\pbtools\backup\acessory.ico c:\pbnav30\pbnew
  124.   if exist c:\pbtools\backup\printer.ico copy c:\pbtools\backup\printer.ico c:\pbnav30\pbnew
  125.   if exist c:\pbtools\backup\megarace.ico copy c:\pbtools\backup\megarace.ico c:\megarace
  126.  
  127.   IF %MPARM%== ALL goto PBCONTINUE
  128.  
  129.   ctty con
  130.   @echo Process complete!
  131.   @echo.╒══════════════════════════════════════════════════════════════════════════╕
  132.   @echo │ These files have been renamed as follows:                                │
  133.   @echo.│                                                                          │
  134.   @echo │ C:\PBNAV30\PBNEW\NAVIGATE.INI      to   C:\PBNAV30\PBNEW\NAVIGATE.FX_    │
  135.   @echo │ C:\PBNAV30\KIDSPACE\KIDSPACE.INI   to   C:\PBNAV30\KIDSPACE\KIDSPACE.FX_ │
  136.   @echo │ C:\PBNAV30\DOCMGR\DOCMGR.INI       to   C:\PBNAV30\DOCMGR\DOCMGR.FX_     │
  137.   @echo ╘══════════════════════════════════════════════════════════════════════════╛
  138.   @echo.
  139.   ctty nul
  140.  
  141.   :PBCONTINUE
  142.  
  143. goto END
  144.  
  145.  
  146.  
  147. :R_PROD      REM**************************************************
  148.  
  149.   REM ** check for existence of files in backup sub-directory **
  150.  
  151.   if not exist c:\pbtools\backup\prodigy.* set PARM= R_PROD
  152.   if not exist c:\prodigy\*.* if exist c:\pbtools\backup\prodigy.* md c:\prodigy
  153.   if %PARM%== R_PROD goto NOT_HERE
  154.  
  155.   REM ** copy files to correct directory **
  156.  
  157.   ctty con
  158.   @echo Please wait while the original Prodigy\Windows files
  159.   @echo are being restored!
  160.   ctty nul
  161.   if exist c:\pbtools\backup\prodigy.ini copy c:\pbtools\backup\prodigy.ini c:\prodigy
  162.  
  163.   IF %MPARM%== ALL goto PRODCONTINUE
  164.  
  165.   ctty con
  166.   @echo Process complete!
  167.   ctty nul
  168.  
  169.   :PRODCONTINUE
  170.  
  171. goto END
  172.  
  173.  
  174. :R_DISKIMAG      REM**************************************************
  175.  
  176.   REM ** check for existence of files in backup sub-directory **
  177.  
  178.   if not exist c:\pbtools\backup\diskimag.ini set PARM= R_DISKIMAG
  179.   if not exist c:\diskimag\*.* if exist c:\pbtools\backup\diskimag.ini md c:\diskimag
  180.   if %PARM%== R_DISKIMAG goto NOT_HERE
  181.  
  182.   REM ** copy files to correct directory **
  183.  
  184.   ctty con
  185.   @echo Please wait while the original Disk Image INI file
  186.   @echo is being restored!
  187.   ctty nul
  188.   if exist c:\pbtools\backup\diskimag.ini if exist c:\diskimag\diskimag.ini ren c:\diskimag\diskimag.ini *.fxi
  189.   if exist c:\pbtools\backup\diskimag.ini copy c:\pbtools\backup\diskimag.ini c:\diskimag
  190.   if exist c:\pbtools\backup\vbrun200.dll if not exist c:\windows\vbrun200.dll copy c:\pbtools\backup\vbrun200.dll c:\windows
  191.   if exist c:\pbtools\backup\vbrun300.dll if not exist c:\windows\vbrun300.dll copy c:\pbtools\backup\vbrun300.dll c:\windows
  192.   
  193.   IF %MPARM%== ALL goto DICONTINUE
  194.   
  195.   ctty con
  196.   @echo Process complete!
  197.   @echo.
  198.   @echo The existing C:\DISKIMAG\DISKIMAG.INI file has been
  199.   @echo renamed to DISKIMAG.FXI.
  200.   @echo.
  201.   ctty nul
  202.  
  203.   :DICONTINUE
  204.  
  205. goto END
  206.  
  207.  
  208. :R_ALL       REM**************************************************
  209.  
  210.   SET MPARM=%ONE%
  211.   for %%A in (WINDOWS ROOT PRODIGY DISKIMAG PBNAV) DO call pbfix %%A
  212.   SET MPARM=
  213.  
  214.   ctty con
  215.   @echo Process Complete!
  216.   ctty nul
  217.  
  218.  
  219.  
  220. goto END
  221.  
  222.  
  223. :HELP        REM**************************************************
  224.  
  225.   ctty con
  226.  
  227.   @ECHO.
  228.   @ECHO    Packard Bell PBFix -- Configuration Restore Utility
  229.   @ECHO ═════════════════════════════════════════════════════════════════════════════
  230.   @ECHO Syntax:
  231.   @ECHO        PBFIX option
  232.   @ECHO      Option:      Files restored...
  233.   @ECHO        WINDOWS      *.INI, *.GRP, and printer drivers
  234.   @ECHO        ROOT         CONFIG.SYS & AUTOEXEC.BAT
  235.   @ECHO        PRODIGY      PRODIGY.INI
  236.   @ECHO        DISKIMAG     The DISKIMAG.INI file and VBRUN300.DLL
  237.   @ECHO        PBNAV        All Navigator .INI files
  238.   @ECHO        ALL          All of the above
  239.   @ECHO.
  240.   if exist c:\dos\more.com goto SCROLL_README
  241.  
  242.   Goto END
  243.  
  244.   :SCROLL_README
  245.   @echo Press CTRL-C to stop here, or for additional information...
  246.   PAUSE
  247.   type c:\pbtools\backup\readme.doc | more
  248.   ctty nul
  249.  
  250. goto END
  251.  
  252.  
  253. :NOT_HERE   REM**************************************************
  254.  
  255.   if %MPARM%==ALL ctty nul
  256.   if %MPARM%!==! ctty con
  257.   
  258.   if %PARM%== R_WIN     goto MESS0
  259.   if %PARM%== R_WINA    goto MESS0A
  260.   
  261.   if %PARM%== R_ROOT    goto MESS1
  262.   if %PARM%== R_PROD    goto MESS2
  263.   
  264.   if %PARM%== R_DISKIMAG goto MESS5B
  265.   
  266.   if %PARM%== R_PBNAV   goto MESS8
  267.  
  268. goto END
  269.  
  270.  
  271. :MESS0      REM**************************************************
  272.  
  273.   @ECHO The original Windows *.INI or *.GRP files were not found in the
  274.   @echo C:\PBTOOLS\BACKUP sub-directory!
  275.   @echo.
  276.  
  277. goto END
  278.  
  279.  
  280. :MESS0A     REM**************************************************
  281.  
  282.   @ECHO Windows must be installed BEFORE using PBFIX!
  283.   @echo 
  284.  
  285. goto END
  286.  
  287.  
  288. :MESS1      REM**************************************************
  289.  
  290.   @ECHO The root directory restore files were not found in the
  291.   @echo C:\PBTOOLS\BACKUP sub-directory!
  292.   @echo 
  293.  
  294. goto END
  295.  
  296.  
  297. :MESS2      REM**************************************************
  298.  
  299.   @ECHO The Prodigy back-up files were not found in the
  300.   @echo C:\pbtools\backup sub-directory!
  301.   @echo 
  302.   @echo Prodigy may not have been included with this system!
  303.   @echo.
  304.  
  305. goto END
  306.  
  307.  
  308. :MESS5B     REM**************************************************
  309.  
  310.   @echo The Disk Image program back-up files were not found in the
  311.   @echo C:\PBTOOLS\BACKUP sub-directory!
  312.   @echo 
  313.   @echo Disk Image may not have been included with this system!
  314.   @echo.
  315.  
  316. goto END
  317.  
  318.  
  319. :MESS8      REM**************************************************
  320.  
  321.   @ECHO The PACKARD BELL NAVIGATOR back-up files were not found in the 
  322.   @ECHO C:\pbtools\backup sub-directory!
  323.   @echo 
  324.   @echo NAVIGATOR may not have been included with this system!
  325.   @echo.
  326.  
  327. goto END                           
  328.  
  329. :END        REM**************************************************
  330.  
  331. SET PARM=
  332. SET ONE=
  333. ctty con
  334.